/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.sack.scratchpad;

/**
 *
 * @author svw
 */

import java.io.File;


/* Utils.java is used by FileChooserDemo2.java. */
public class Utils {
    public final static String txt = "txt";


    /*
     * Get the extension of a file.
     */
    public static String getExtension(File f) {
        String ext = null;
        String s = f.getName();
        int i = s.lastIndexOf('.');

        if (i > 0 &&  i < s.length() - 1) {
            ext = s.substring(i+1).toLowerCase();
        }
        return ext;
    }

    /** Returns an ImageIcon, or null if the path was invalid. */
    
}
